<template>
  <uni-popup ref="Kemu1ProductPopup" type="center" :safe-area="false" :mask-click="false">
    <view class="setting-container">
      <view class="bottom">
        <view class="tips">【终身全科VIP】比单独购买更加划算</view>
        <view class="btns">
          <view class="exit" @click="toBuyKemu1">只买科一</view>
          <view class="stop" @click="toBuyAllVip">
            <view class="flag">最多人购买</view>
            购买终身全科
          </view>
        </view>
      </view>
      <view class="close-icon" @click="toClose">
        <image src="@/static/hei_cha@2x.png"></image>
      </view>
    </view>
  </uni-popup>
</template>
<script>
export default {
  name: "Kemu1ProductDialog",
  methods: {
    toClose() {
      this.$refs.Kemu1ProductPopup.close()
    },
    open() {
      this.$refs.Kemu1ProductPopup.open()
    },
    toBuyAllVip() {
      this.toClose()
      this.$emit('buyAllVip')
    },
    toBuyKemu1() {
      this.toClose()
      this.$emit('buyKemu1Vip')
    }
  },
}
</script>
<style scoped lang="scss">
.setting-container {
  width: 602rpx;
  height: 750rpx;
  background-image: url("http://down.qwdata.vip/app_icon/1709306545917");
  background-size: cover;
  position: relative;
  display: flex;
  flex-direction: column;

  .bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2b2d3a;
    border-bottom-left-radius: 50rpx;
    border-bottom-right-radius: 50rpx;
    display: flex;
    flex-direction: column;
    .tips {
      color: #fff;
      font-size: 15px;
      text-align: center;
      margin-top: 30rpx;
      margin-bottom: 45rpx;
      margin-left: 20rpx;
      margin-right: 20rpx;
    }

    .btns {
      margin: 30rpx 38rpx;
      height: 88rpx;
      display: flex;
      font-size: 16px;
      margin-top: 0;

      .exit {
        border-radius: 100rpx;
        border: 1px solid #fff;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 30rpx;
        flex: 1;
      }
      @keyframes tiao2 {
        0% {
          transform: translateY(-5px);
        }
        50% {
          transform: translateY(0px);
        }
        100% {
          transform: translateY(-5px);
        }
      }
      .stop {
        background-image: linear-gradient(90deg, #F4C1A2 0%, #F7CDB2 47%, #F8EDDF 100%);
        border-radius: 100rpx;
        color: #221204;
        display: flex;
        padding: 0 40rpx;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        position: relative;
        .flag {
          position: absolute;
          font-size: 12px;
          color: #FFFFFF;
          z-index: 1;
          top: -20rpx;
          padding: 5rpx 20rpx;
          border-top-left-radius: 20rpx;
          border-bottom-right-radius: 20rpx;
          background-image: linear-gradient(116deg, #FF5536 0%, #F12F2E 95%);
          animation: tiao2 1000ms infinite;
        }
      }
    }
  }

  .close-icon {
    align-self: center;
    position: absolute;
    bottom: -200rpx;
    width: 58rpx;
    height: 58rpx;
    background-color: #fff;
    border-radius: 100rpx;
    display: flex;
    align-items: center;
    justify-content: center;

    image {
      width: 25rpx;
      height: 25rpx;
    }
  }
}
</style>
